clear;
close all;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% VARIANCE DECOMPOSITION #1                                    %%%
%%% METHODOLOGY BY DI GIOVANNI, LEVCHENKO AND MEJEAN (ECMA 2014) %%%
%%%                                                              %%%
%%% IMPORTING AND EXPORTING MICRO-ESTIMATION RESULTS             %%%
%%%                                                              %%%   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Program: this file reads in the baseline regression results
% ("microestimation") for the whole economy sample ("all")

% Change directory
cd ('')

% Import: get raw data
data=csvread('growth_regs_revctry_all.csv',1,0);

id_fp = data(:,1);
id_f = data(:,2);
id_ip = data(:,3);
id_i = data(:,4);
id_p = data(:,5);
year = data(:,6);
id_ipy = data(:,7);
gr_variable = data(:,8);
gr_idio = data(:,9);
gr_idio_com = data(:,10);
gr_idio_dest = data(:,11);
gr_sec = data(:,12);
gr_macro = data(:,13);
w_fp = data(:,14); 
w_f = data(:,15);
w_ip = data(:,16);
w_i = data(:,17);
w_p = data(:,18);

clear data;

% Export: save in .csv format for linear algebra manipulations in Matlab
save reg_output_all_ca_growth3;

